package id.co.rho.scoring.cid.shared.model;

import com.extjs.gxt.ui.client.data.BaseModel;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by IntelliJ IDEA.
 * User: User3
 * Date: 30/06/11
 * Time: 13:46
 *
 * @author : Frizky
 * @email : frizkey@gmail.com
 */
public class TestModel extends BaseModel {

    public TestModel(String satu, String dua, String tiga) {
        set("cidNo", satu);
        set("customerName", dua);
        set("employeeNo", tiga);
    }

    public String getCidNo() {
        return get("cidNo");
    }


    public String getCustomerName() {
        return get("customerName");
    }

    public String getEmplyeeNo() {
        return get("employeeNo");
    }

    public static List<TestModel> getModels() {
        List<TestModel> models = new ArrayList<TestModel>();

        models.add(new TestModel("1", "2", "3"));
        models.add(new TestModel("2", "2", "3"));
        models.add(new TestModel("3", "2", "3"));
        models.add(new TestModel("4", "2", "3"));
        models.add(new TestModel("5", "2", "3"));
        models.add(new TestModel("6", "2", "3"));
        models.add(new TestModel("7", "2", "3"));

        return models;
    }

//    public static List<CriteriaModel> getCriteriaModelNonFC() {
//        List<CriteriaModel> criteriaModelList = new ArrayList<CriteriaModel>();
//        criteriaModelList.add(new CriteriaModel("cidNo", "CID No.", "CorporateEntity", new String()));
//        criteriaModelList.add(new CriteriaModel("customerName", "Name", "CorporateEntity", new String()));
//        criteriaModelList.add(new CriteriaModel("taxNo", "taxNo", "NPWP", new String()));
//        criteriaModelList.add(new CriteriaModel("customerGroup", "Group", "CorporateEntity", new String()));
//        criteriaModelList.add(new CriteriaModel("officerCode", "Officer Code", "CorporateEntity", new String()));
//        criteriaModelList.add(new CriteriaModel("tickerCode", "Ticker Code", "CorporateEntity", new String()));
//        criteriaModelList.add(new CriteriaModel("corpType", "Corporate Type", "CorporateEntity", new ArrayList(Arrays.asList(CorporateType.values()))));
//        criteriaModelList.add(new CriteriaModel("corpStatus", "Corporate Status", "CorporateEntity", new ArrayList(Arrays.asList(CorporateStatus.values()))));
//        criteriaModelList.add(new CriteriaModel("prosStatus1", "Prospect Status", "CorporateEntity", new ArrayList(Arrays.asList(ProspectStatus.values()))));
//        criteriaModelList.add(new CriteriaModel("prosStatus2", "Rating Agency", "CorporateEntity", new ArrayList(Arrays.asList(RatingAgency.values()))));
//        criteriaModelList.add(new CriteriaModel("sizeFlag", "Size", "CorporateEntity", new ArrayList(Arrays.asList(SizeFlag.values()))));
//        criteriaModelList.add(new CriteriaModel("countryOfOrigin", "Country Of Origin", "CorporateEntity", new String()));
//        criteriaModelList.add(new CriteriaModel("economySector", "Economy Sector", "CorporateEntity", new String()));
//        criteriaModelList.add(new CriteriaModel("subEconomySectorLvl1", "Sub Economy Lvl. 1", "CorporateEntity", new ArrayList(Arrays.asList(EconomySector.values()))));
//        criteriaModelList.add(new CriteriaModel("subEconomySectorLvl2", "Sub Economy Lvl. 2", "CorporateEntity", new ArrayList(Arrays.asList(EconomySector.values()))));
//        criteriaModelList.add(new CriteriaModel("subEconomySector", "Sub Economy Sector", "CorporateEntity", new ArrayList(Arrays.asList(EconomySector.values()))));
//        criteriaModelList.add(new CriteriaModel("isGoPublic", "Go Public", "CorporateEntity", new String()));
//        criteriaModelList.add(new CriteriaModel("permitType", "Permit Type", "CorporateEntity", new ArrayList(Arrays.asList(PermitType.values()))));
//        criteriaModelList.add(new CriteriaModel("permitNo", "Permit No.", "CorporateEntity", new String()));
//        criteriaModelList.add(new CriteriaModel("permitDate", "Permit Date", "CorporateEntity", new Date()));
//        criteriaModelList.add(new CriteriaModel("litigationRecNo", "Litigation Rec. No.", "CorporateEntity", new String()));
//        criteriaModelList.add(new CriteriaModel("litigationRecDate", "Litigation Rec. Date", "CorporateEntity", (Serializable) TestModel.getYear()));
//        criteriaModelList.add(new CriteriaModel("yearOps", "Year Operation", "CorporateEntity", new ArrayList(Arrays.asList(YearOps.values()))));
//        criteriaModelList.add(new CriteriaModel("invCap", "invCap", "CorporateEntity", new String()));
//        criteriaModelList.add(new CriteriaModel("invBorr", "invBorr", "CorporateEntity", new String()));
//        criteriaModelList.add(new CriteriaModel("bankRel", "bankRel", "CorporateEntity", new String()));
//        criteriaModelList.add(new CriteriaModel("employeeNo", "employeeNo", "CorporateEntity", new String()));
//        return criteriaModelList;
//    }
//
//    public static List<CriteriaModel> getCriteriaModelFC() {
//        List<CriteriaModel> criteriaModelList = new ArrayList<CriteriaModel>();
//        criteriaModelList.add(new CriteriaModel("totAdjAssets", "Total Adjusted Assets ", "Ratio", null));
//        criteriaModelList.add(new CriteriaModel("totAdjDebt", "Total Adjusted Debt ", "Ratio", null));
//        criteriaModelList.add(new CriteriaModel("totAdjEquity", "Total Adjusted Equity ", "Ratio", null));
//        criteriaModelList.add(new CriteriaModel("totSales", "Total Sales ", "Ratio", null));
//        criteriaModelList.add(new CriteriaModel("netIncome", "Net Income ", "Ratio", null));
//        return criteriaModelList;
//    }

//    public static List<ModelData> getCriteriaList() {
//        List<ModelData> baseModels = new ArrayList<ModelData>();
//        NonFinancialCriteria nfCriteria = new NonFinancialCriteria();
//        nfCriteria.setTypeCriteria(new CriteriaModel("corpType", "Corporate Type", "CorporateEntity", new ArrayList(Arrays.asList(CorporateType.values()))));
//        nfCriteria.setValueCriteria("PT");
//        baseModels.add(nfCriteria);
//
//        nfCriteria = new NonFinancialCriteria();
//        nfCriteria.setTypeCriteria(new CriteriaModel("countryOfOrigin", "Origin Country", "CorporateEntity", new String()));
//        nfCriteria.setValueCriteria("Oyeeahhhh");
//        baseModels.add(nfCriteria);
//
//        FinancialCriteria fCriteria = new FinancialCriteria();
//        fCriteria.setTypeCriteria(new CriteriaModel("corpStatus", "Corporate Status", "CorporateEntity", null));
//        fCriteria.setFromNumeric(BigDecimal.TEN);
//        fCriteria.setToNumeric(BigDecimal.ONE);
//        baseModels.add(fCriteria);
//
//        return baseModels;
//    }

    public static List<Integer> getYear() {
        List<Integer> listInteger = new ArrayList<Integer>();
        for (int i = 1900; i < 2099; i++) {
            listInteger.add(i);
        }
        return listInteger;
    }
}
